package com.rcklos.NettyLentMe.protocol.services;

public class ServicePool {

    public static final int SERVICE_REGISTER = 0x01;          // 注册
    public static final int SERVICE_LOGIN = 0x02;             // 登录
    public static final int SERVICE_LOGOUT = 0x03;            // 登出
    public static final int SERVICE_MATCH = 0x04;             // 匹配

    public static void service(int type, String json, String extend){
        switch (type){
            case SERVICE_REGISTER:
                RegisterService.getInstance().service(json, extend);
                break;
            case SERVICE_LOGIN:
                LoginService.getInstance().service(json, extend);
                break;
            case SERVICE_LOGOUT:
                LogoutService.getInstance().service(json, extend);
                break;
            case SERVICE_MATCH:
                MatchService.getInstance().service(json, extend);
                break;
        }
    }

}
